package define;


public enum ErrorDefine 
{
	E_CANT_OPEN_EXCEL_ERROR(1, "can't open excel file"),
	E_CANT_FIND_SHEET_ERROR(2, "can't find sheet"),
	E_CHILD_OUT_OF_RANGE_ERROR(3, "child index out of range"),
	E_CANT_FIND_CHILD_ERROR(4, "can't find child name"),
	E_EXP_NOT_MATCH_ERROR(5, "express not match or not closed"),
	E_BUILD_STRING_ERROR(6, "string error, forget to use esc?"),
	E_CELL_DEFINE_ERROR(7, "cell define wrong"),
	E_ATTRIBUTE_WRONG_ERROR(8, "cell attribute define wrong"),
	E_NO_ATTRIBUTE_ERROR(9, "no attribute"),
	E_NO_EXCEL_FILE_ERROR(10, "no such excel loaded"),
	E_NO_FUNCTION_ERROR(11, "no such function"),
	E_FUNCTION_PARAM_ERROR(12, "function's parameter wrong"),
	E_FUNCTION_PARAM_NUMBER_ERROR(13, "function's parameter number wrong"),
	E_VARIABLE_MUST_NUMBER_ERROR(14, "variable must be a number"),
	E_FUNCTION_PARAM_APPOINTED_ERROR(15, "this parameter is appointed"),
	E_FUNCTION_CHILDREN_NUMBER_ERROR(16, "function's children number wrong"),
	E_NO_VARIABLE_ERROR(17, "can't find variable"),
	E_CONDITION_EXPRESS_NOT_CLOSE_ERROR(18, "condition express is not closed"),
	E_CONDITION_EXPRESS_ERROR(19, "condition express is wrong"),
	E_LOST_RELATION_ERROR(20, "lost relationship express"),
	E_NO_CONDITION_ERROR(21, "no sucn relationship express"),
	E_CONDITION_TYPE_ERROR(22, "relationship type wrong"),
	E_COMPARE_MUST_NUMBER_ERROR(23, "compare number must take number"),
	E_SUBSTRING_ERROR(24, "sub string range wrong"),
	E_NO_SCRIPT_ERROR(25, "no script sheet named"),
	E_SCRIPT_SHEET_ERROR(26, "script sheet format wrong"),
	E_EXCEL_EXTEND_ERROR(27, "excel's extend name must be \"xls\" or \"xlsx\""),
	E_EXCEL_NAME_ERROR(28, "excel name wrong"),
	E_CANT_WRITE_SCRIPT_ERROR(29, "can't write script"),
	E_PARAMETER_MUST_VARIABLE_ERROR(30, "parameter must be vraiable"),
	E_CANT_FIND_SCRIPT_ERROR(31, "can't find script"),
	E_CALL_SCRIPT_ERROR(32, "error in called script"),
	E_CANT_PAUSE_ERROR(33, "can't pause output"),
	E_ARGS_NO_INPUT_ERROR(34, "no input, use \"-i\""),
	E_NO_INPUT_FILE_ERROR(35, "no input files"),
	E_ARGS_NO_SCRIPT_ERROR(36, "no script"),
	E_CANT_READ_SCRIPT_ERROR(37, "can't read script"),
	E_CANT_USE_ATTR_ERROR(38, "child doesn't has this attribute"),
	E_BREAK_ERROR(39, "break must in for"),
	E_HAS_MUST_FOR_CELL_ERROR(40, "has or !has only used for cell"),
	E_COMPUTE_ILLEGAL_ERROR(41, "compute express is illegal"),
	E_NO_SEMICOLON_ERROR(42, "can't put semicolon or a new line in compute"),
	E_NO_COMPUTE_TYPE_ERROR(43, "no compute type"),
	E_OUT_RANGE_ERROR(44, "parameter out of range"),
	E_NULL_VARIABLE_ERROR(45, "variable must has text"),
	E_NO_SUCH_TYPE_ERROR(46, "no such excel type"),
	E_DUPLICATE_VALUE_ERROR(47, "duplicate value of a node"),
	E_TREE_DEFINE_ERROR(48, "tree define wrong"),
	E_ATTRIBUTE_HEIGHT_ERROR(49, "attribute cell height not same"),
	E_SHEET_TYPE_WRONG(50, "sheet type wrong"),
	E_XML_ERROR(51, "xml wrong"),
	E_CANT_READ_XML_ERROR(52, "can't read xml"),
	E_ROW_HAS_EXISTS_ERROR(54, "row has already exists"),
	E_CELL_HAS_EXISTS_ERROR(55, "cell has already exists"),
	E_CANT_FIND_CELL_ERROR(56, "can't find cell"),
	E_NOT_APPOINT_SHEET_ERROR(57, "not appoint sheet"),
	E_CANT_WRITE_EXCEL_ERROR(58, "can't write to excel"),
	E_ATTRIBUTE_TYPE_MATCH_ERROR(59, "attribute type not math"),
	E_HEAD_NUMBER_ERROR(60, "head number is wrong"),
	E_NO_SUCH_EXTERN_ERROR(61, "no such type extern"),
	E_EXTERN_SPLIT_ERROR(62, "use " + Config.CODE_TYPE_SPLIT + " to split"),
	E_TYPE_DEFINE_ERROR(63, "no such type"),
	E_REFERENCE_NULL_ERROR(64, "reference element is empty"),
	E_REFERENCE_NO_NAME_TYPE_ERROR(65, "reference member must have name and type"),
	E_ALL_TYPE_NULL_ERROR(66, "all type must set value"),
	E_TYPE_NOT_MATCH_ERROR(67, "extra type not match"),
	E_LANGUAGE_NOT_SUPPORT_ERROR(68, "the language not support the type"),
	E_NO_LANGUAGE_ERROR(69, "not support this language"),
	E_CANT_WRITE_CODE_ERROR(70, "can't write code"),
	E_FILE_PATH_WRONG_ERROR(71, "file path wrong"),
	E_CANT_COPY_FILE_ERROR(72, "can't copy file"),
	E_CANT_COPY_DIR_TO_FILE_ERROR(73, "can't copy a dir to a file"),
	E_VARIABLE_NOT_LIST_ERROR(74, "variable is not a list"),
	E_LIST_OUT_RANGE_ERROR(75, "out of list range"),
	E_LIST_INDEX_MUST_NUMBER_ERROR(76, "list's index must be number"),
	E_LIST_ONLY_TAKE_NUMBER_ERROR(77, "list must use number in for loop"),
	E_FOR_MUST_USE_LIST_ERROR(78, "only list and cell can used in for loop"),
	E_FUNCTION_DUPLICATE_ERROR(80, "redefine function"),
	E_FUNCTION_NAME_MUST_STRING_ERROR(81, "function's name must be a string"),
	E_FUNCTION_DEFINE_ERROR(82, "function can't define in function block"),
	E_UNKNOWN_CHARSET_ERROR(83, "unknown charset"),
	E_NO_FONT_ERROR(84, "don't find font"),
	E_SIZE_NO_INT_ERROR(85, "size must be a number"),
	E_BG_COLOR_NO_INT_ERROR(86, "background color must be a number"),
	E_FG_COLOR_NO_INT_ERROR(87, "frontground color must be a number"),
	E_NEW_FONT_NO_FONT_NAME_ERROR(88, "new font must have a font name"),
	E_CANT_SAVE_IMAGE_ERROR(89, "can't save image"),
	E_NO_CONFIG_ERROR(90, "can't find match config"),
	E_CONFIG_WRONG_ERROR(91, "config must start with -"),
	E_CONFIG_TYPE_ERROR(92, "config type wrong, require"),
	E_MISS_CONFIG_ERROR(93, "miss value of a config"),
	E_CANT_FIND_EXCEL_ERROR(94, "can't find excel file"),
	E_ILLEGAL_INPUT_ERROR(95, "config value illegal"),
	E_MAP_HAS_NO_KEY_ERROR(96, "map must use with a key"),
	E_PARAM_CHILD_NUMBER_ERROR(97, "funciont's param and children number not match"),
	E_VARIABLE_NOT_MAP_ERROR(98, "variable is not a map"),
	E_VARIABLE_MUST_LIST_MAP_ERROR(99, "varibale must a list or map"),
	E_OUTPUT_CHARSET_ERROR(100, "only support these charset"),
	E_CANT_FIND_ATLAS_ERROR(101, "can't find atlas"),
	E_ATLAS_IMAGE_TOO_LARGE_ERROR(102, "image of atlas too large"),
	E_CANT_READ_IMAGE_ERROR(103, "can't read image"),
	;
	
	private String m_message;
	private int m_id;
	
	private ErrorDefine(int id, String message)
	{
		this.m_id =id;
		this.m_message = message;
	}
	
	public int getId()
	{
		return m_id;
	}
	
	public String getMessage()
	{
		return m_message;
	}
}
